package com.shiyi.design.builder;

/**
 * @author wangzhanshuai
 * @date 2021/1/27 5:31 下午
 * @since 1.0
 */
public class CommonHouseBuilder implements HouseBuilder {

    private House house = new House();

    @Override
    public HouseBuilder buildWalls() {
        house.setWall("红砖");
        return this;
    }

    @Override
    public HouseBuilder buildDoor() {
        house.setDoor("木门");
        return this;
    }

    @Override
    public HouseBuilder buildWindows() {
        house.setWindows("千叶窗");
        return this;
    }

    @Override
    public HouseBuilder buildRoof() {
        house.setRoof("封顶");
        return this;
    }

    @Override
    public House build() {
        return house;
    }
}
